﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace simWaifu
{
    public partial class FormChatLog : Form
    {
        public FormChatLog()
        {
            InitializeComponent();
        }

        public void Write(string s)
        {
            textBox1.AppendText(s);
        }

        public void WriteLine(string s)
        {
            if (textBox1.Lines.Count() > 500)
            {
                textBox1.Clear();
                Write("Performed flush after 500 lines.");
                Write(Environment.NewLine);
                Write("Check the simWaifuChatLog.txt file for the complete output of this session.");
                Write(Environment.NewLine);
                Write("It is located at: " + ChatLogger.GetChatFileName());
                Write(Environment.NewLine);
                Write(Environment.NewLine);
            }
            Write(s);
            Write(Environment.NewLine);
        }



    }
}
